﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace mevsukovGames
{
    public class InputHandler : InputHandlerBase
    {
        public override void QueryKeyBoard()
        {
            if (Console.KeyAvailable)
            {
                ConsoleKeyInfo kInfo = Console.ReadKey(true);

                switch (kInfo.Key)
                {
                    case ConsoleKey.LeftArrow:
                        OnMoveLeft();
                        break;
                    case ConsoleKey.RightArrow:
                        OnMoveRight();
                        break;
                    case ConsoleKey.DownArrow:
                        OnMoveDown();
                        break;
                    case ConsoleKey.UpArrow:
                        OnRotate();
                        break;
                }
            }
        }
    }
}
